import * as api from '../util/api';
export default{
	namespace:'infos',
	state:{
		list:[]
	},
	reducers:{
		change(state,{payload}){
			return {...state,...payload}
		}
	},
	effects:{
		*getData(payload,{call,put}){
			console.log(payload)
			const result=yield call(api.proList,payload.payload)
			console.log(result.data.products)
			yield put({
				type:'change',
				payload:{
					list:result.data.products
				}
			})
		}
	}
}